/**
 * @Author : woon
 * @Timestamp : 2016-08-16
 */
var open = require("helper/open");
var rootView = ui("$");

var lineLayoutType = ui("lineLayoutType");
var lableType = ui("lableType");//成员类型（中文）

rootView.setMapping({
	"lableName.tag" : "memberId",
	"lableName.text" : "memberName",
    "imgLogo.source" : "fullMemberImg",
    "lableType.tag" : "type",
    "joinTime.text" : "cnNewAt",
    "joinTime.tag" : "gradeName"
    
});

rootView.on("dataRefreshed", function(){
	var memberType = ui("lableType").tag;
	var gradeName = ui("joinTime").tag;
	
	if(memberType=="1"){
		lableType.text = "群主";
		lableType.bgColor = "FF7E00FF";
		lineLayoutType.visible = true;
	}else if(memberType=="2"){
		lableType.text = "管理员";
		lineLayoutType.visible = true;
	}else{
		if(gradeName!=null && gradeName!=""){
			lableType.text = gradeName;//显示头衔
			lableType.bgColor = "B0B0FFFF";
			lineLayoutType.visible = true;
		}else{
			lineLayoutType.visible = false;
		}
	}
});
